<template>
	<view class="BackTop">
		<view class="m" v-for="(item,i) in 50" :key="i">
			我是一个数据
		</view>
		<BackTop :scrollTop="scrollTop"></BackTop>
	</view>
</template>

<script>
	import BackTop from "@/components/Back-top/Back-top.vue"
	export default{
		data(){
			return{
				scrollTop:0
			}
		},
		components:{
			BackTop
		},
		onLoad() {
			
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop //获取下拉的位置
		},
	}
</script>

<style>
	page{
		font-size: 34rpx;
	}
	.m{
		margin-bottom: 30rpx;
		text-align: center;
	}
</style>
